package com.lonely.purchase.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lonely.common.core.domain.Select;
import com.lonely.common.core.domain.StatusInfo;
import com.lonely.goods.domain.entity.SysGoods;
import com.lonely.order.domain.entity.SysOrder;
import com.lonely.purchase.domain.dto.materialpurchase.GoMaterialPurchaseDTO;
import com.lonely.purchase.domain.dto.materialpurchase.QueryMaterialPurchasePageDTO;
import com.lonely.purchase.domain.dto.materialpurchase.RecycledMaterialsDTO;
import com.lonely.purchase.domain.entity.SysMaterialPurchase;
import com.lonely.purchase.domain.vo.materialpurchase.QueryMaterialPurchasePageVO;

import java.util.List;

/**
 * @author : 黄志标
 * @date: 2025/7/18 17:46
 * @description: 物料采购服务
 */
public interface IMaterialPurchaseService extends IService<SysMaterialPurchase> {

    /**
     * 分页查询
     *
     * @param queryDto
     * @return
     */
    Page<QueryMaterialPurchasePageVO> page(QueryMaterialPurchasePageDTO queryDto);

    /**
     * 获取采购供应商下拉列表
     *
     * @param supplierName
     * @return
     */
    List<Select> getPurchaseSupplierSelects(String supplierName);

    /**
     * 采购
     *
     * @param goMaterialPurchases
     */
    void goPurchase(List<GoMaterialPurchaseDTO> goMaterialPurchases);

    /**
     * 获取物料采购单位
     *
     * @param id
     * @return
     */
    String getMaterialPurchaseUnit(Long id);

    /**
     * 回料
     *
     * @param recycledMaterialsDTO
     */
    void recycledMaterials(RecycledMaterialsDTO recycledMaterialsDTO);

    /**
     * 通知裁床
     *
     * @param id
     */
    void notifyCuttingBed(Long id);

    /**
     * 创建采购单
     *
     * @param orders
     */
    void createPurchaseByOrders(List<SysOrder> orders);

    /**
     * 同步商品报价单的物料信息
     *
     * @param sysGoods
     */
    void synchronizedGoodsQuotationSheetPartMaterials(SysGoods sysGoods);

    /**
     * 获取物料采购状态信息
     *
     * @param queryDto
     * @return
     */
    List<StatusInfo> getStatusInfo(QueryMaterialPurchasePageDTO queryDto);
}
